package com.dkha.server.modules.entities.faceCamera;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import javax.validation.constraints.*;

@Data
@ApiModel(description = "新增摄像头")
public class InsertFaceCamera {
    @NotBlank(message = "摄像头名称不能为空")
    @ApiModelProperty(value = "摄像头名称")
    private String cameraName;

    @ApiModelProperty(value = "摄像头区域-码值")
    private String cameraRegionFirstlevel;

    public String getCameraRegionFirstlevel() {
        StringUtils.join(cameraRegionFirstlevelArrays, ',');

        return  StringUtils.join(cameraRegionFirstlevelArrays, ',');
    }

    @NotNull(message = "摄像头区域不能为空")
    @ApiModelProperty(value = "摄像头区域-码值")
    private long[] cameraRegionFirstlevelArrays;


    @ApiModelProperty(value = "摄像头详细地址")
    private String cameraAddress;

    @NotBlank(message = "摄像头经度不能为空")
    @Min(value = -180,message = "经度不能小于-180")
    @Max(value = 180,message = "经度不能大于180")
    @ApiModelProperty(value = "摄像头经度")
    private String cameraLongitude;

    @NotBlank(message = "摄像头纬度不能为空")
    @Min(value = -90,message = "纬度不能小于-90")
    @Max(value = 90,message = "纬度不能大于90")
    @ApiModelProperty(value = "摄像头纬度")
    private String cameraLatitude;
//
//    @NotBlank(message = "位置类型不能为空")
//    @ApiModelProperty(value = "位置类型-码值")
//    private String cameratLocationtypeId;

//    @ApiModelProperty(value = "公安机关代码")
//    private String publicSecurityCode;
//
//    @ApiModelProperty(value = "公安机关名称")
//    private String publicSecurityName;

//    @ApiModelProperty(value = "建设单位")
//    private String constructionUnit;
//
//    @ApiModelProperty(value = "管理单位")
//    private String managementUnit;
//
//    @ApiModelProperty(value = "管理人员")
//    private String managementPersonnel;
//    @ApiModelProperty(value = "联系电话")
//    private String contactNumber;
    @NotBlank(message = "ip不能为空")
    @ApiModelProperty(value = "IP")
    private String ip;

//    @NotBlank(message = "port不能为空")
    @ApiModelProperty(value = "端口")
    private String port;

//    @NotBlank(message = "用户名不能为空")
    @ApiModelProperty(value = "用户名")
    private String userName;

//    @NotBlank(message = "密码不能为空")
    @ApiModelProperty(value = "密码")
    private String passwd;

//    @NotBlank(message = "型号不能为空")
    @ApiModelProperty(value = "型号")
    private String version;

    @NotBlank(message = "品牌id")
    @ApiModelProperty(value = "品牌id")
    private String idBrand;

//    @NotBlank(message = "品牌不能为空")
    @ApiModelProperty(value = "品牌")
    private String brand;

    @NotBlank(message = "rtsp地址不能为空")
    @ApiModelProperty(value = "rtsp地址")
    private String rtspUrl;

    @ApiModelProperty(value = "备注信息")
    private String remarks;


}
